<template>
	<view class="container">

		<view class="large"  v-for="(item,index) in Info" key="index" @click="toDetails(index)" >
			<view class="info">
				<view class="name">
					{{item.title}}
				</view>
				<view class="boxbottom">
					<view class="photo" v-if="item.urlList.length!==0">
						<image :src="item.urlList[0]" mode=""></image>
					</view>
					<view class="describe">
						<view class="description">
							物品描述：{{item.description}}
						</view>
						<view class="price">
							来自：{{item.userName}}
						</view>
					</view>
					<view class="watermark">
						失物招领
					</view>
				</view>
			</view>


		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		props: {
			Info: Object
		},

		methods: {
			toDetails(index) {
				console.log(this.Info[index].gid);
				this.gid = this.Info[index].gid
				// console.log(this.gid);
				uni.navigateTo({
					// url: '../lostdetails/details?gid=' + this.gid
					url:'../../pages/lostDetails/lostDetails?gid=' + this.gid
				})

			},
		}
	}
</script>

<style lang="less" scoped>


	.watermark {
		position: absolute;
		top: 10%;
		right: 5%;
		font-size: 20px;
		font-weight: 400;
		color: #aeaeae;
		// height: 23px;
		// width: 100%;
		z-index: 9;
		color: #3766a3;
	}
	.container {
		padding: 1px 0;
		background-color: #f4f4f4;
	}
	
	.large {
		position: relative;
		// width: 95%;
		// height: 120px;
		margin: 10px 0;
		background-color: #ffffff;
		border-radius: 20px;
		padding: 10px;
		box-sizing: border-box;
		overflow: hidden;
		padding-bottom: 20px;
	}
	
	.photo {
		display: inline-block;
		width: 50px;
		height: 50px;
		margin: 2%;
	
		image {
			width: 100%;
			height: 100%;
			
		}
	}
	
	.name {
		font-size: 19px;
		font-weight: 550;
		margin: 10px 10px;
		border-bottom: 1px solid #dddddd;
		color: #64727e;
		padding-bottom: 15px;
	}
	
	.boxbottom {
		width: 100%;
	
		
	}
	
	.describe {
		display: inline-block;
		margin: 10px 0px 20px 10px;
		font-size: 17px;
		// height: 30px;
		width: 70%;
		line-height: 25px;
		vertical-align:top;
		.description {
		word-break: break-all;  /* break-all(允许在单词内换行。) */
		text-overflow: ellipsis;  /* 超出部分省略号 */
		display: -webkit-box; /** 对象作为伸缩盒子模型显示 **/
		-webkit-box-orient: vertical; /** 设置或检索伸缩盒对象的子元素的排列方式 **/
		-webkit-line-clamp: 2; /** 显示的行数 **/
		overflow: hidden;
		}
	}
	.price {
		color: #ff8382;
	}
	
	.circle {
		position: absolute;
		top: 20px;
		right: -20px;
		font-size: 50px;
		font-weight: 300;
		color: #c6d9df;
		-moz-transform: rotate(-40deg);
		-webkit-transform: rotate(-40deg);
		// border: 1px solid #ccc;
		border-radius: 20%;
	}
</style>
